package com.itheima02;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class Tcp {
    public static void main(String[] args) throws IOException {

        Socket socket=new Socket("127.0.0.1",9999);

        OutputStream outputStream = socket.getOutputStream();

        outputStream.write("张三要结婚了".getBytes());

        outputStream.close();
        socket.close();


    }
}
